import request from '../utils/request'


// 获取未删除的用户数据
export function getUserList() {
    return request({
        url: '/professionalTitle',
        params: {
            // 后台过滤
            isdelete: 0
        }
    })
}

// 获取对应分页数据  ?_page=1&_limit=10
export function getPagingUserList(page, limit) {
    return request({
        url: `/professionalTitle/?_page=${page}&_limit=${limit}`,
        params: {
            // 后台过滤
            isdelete: 0
        }
    })
}


// 获取对应分页数据
export function getUserPaging(query) {
    return request({
        url: '/professionalTitle',
        params: {
            ...query,
            // 后台过滤
            isdelete: 0
        }
    })
}

// 添加用户
export function addUser(Obj) {
    return request({
        url: '/professionalTitle',
        method: 'post',
        data: Obj
    })
}

// 伪删除用户
export function delUserData(id) {
    return request({
        url: `/professionalTitle/${id}`,
        method: 'patch',
        data: {
            isdelete: 1
        }
    })
}

// 修改用户信息
export function updataUserData(id, obj) {
    return request({
        url: `/professionalTitle/${id}`,
        method: 'patch',
        data: obj
    })
}



